<?php
namespace app\home\model;

use think\Db;

class UserModel  
{
    /**
     * 单例模式
     * @return UserModel
     *
     */
    public static function instance(){
        static $m = null;
        if(!$m){
            $m = new UserModel();
        }
        return $m;
    }
    /**
     * 用户列表
     */
    public function userlist($bid){
        $list = Db::name('user')->field('uid,bid,phone,address,nickname,sex,birthday,regtime')->where('bid',$bid)->paginate(10);
        return $list;
    }
    /**
     * 用户详情
     */
    public function details($uid){
        $result = Db::name('user')->field('uid,bid,phone,nickname,name,head,sex,birthday,address,regtime,login_status')->where('uid',$uid)->find();
        return $result;
    }


}
